//
//  BadgesItem.m
//  SpendFunk
//
//  Created by KID on 5/12/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "BadgesItem.h"


@implementation BadgesItem
@synthesize m_pImgBadges;
@synthesize m_pLblTileBadge;


- (id)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code.
        NSString *path;
        UIImage *img;

		path = [[NSString alloc] initWithFormat:@"%@",IMG_BADGES];
		img = [UIImage imageNamed:path];
		m_pImgBadges = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, img.size.width, img.size.height)];
		[m_pImgBadges setImage:img];
        [self addSubview:m_pImgBadges];
        
        // badge title
		m_pLblTileBadge = [[UILabel alloc] initWithFrame:CGRectMake(0, m_pImgBadges.frame.size.height +10, 80, 10)];
		[m_pLblTileBadge setBackgroundColor:[UIColor clearColor]];
		[m_pLblTileBadge setText:@"Badges Title" ];
		m_pLblTileBadge.font = [UIFont boldSystemFontOfSize:10];
		m_pLblTileBadge.textAlignment = UITextAlignmentCenter;
        [self addSubview:m_pLblTileBadge];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code.
}
*/

- (void)dealloc {
    [super dealloc];
}


@end
